#include "UdpServer.hpp"
#include <memory>

void Usage(std::string proc)
{
    std::cerr << "Usage :" << proc << "loaclport" << std::endl;
}

// ./udp_server serverport
int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        Usage(argv[0]);
        exit(0);
    }
    uint16_t localport = std::stoi(argv[1]);
    EnableConsoleLogStrategy();
    std::unique_ptr<UdpServer> ptr = std::make_unique<UdpServer>(localport);
    ptr->Init();
    ptr->Start();

    return 0;
}